package com.hk.migration.cannal;

import com.alibaba.otter.canal.protocol.CanalEntry;

import java.util.List;

public interface CanalProcess {
    /**
     * 是否处理
     * @param tableName
     * @param eventType
     * @return
     */
    boolean apply(String tableName, CanalEntry.EventType eventType);

    /**
     * 处理完毕是否继续流转
     * @param beforeCanalDataList
     * @param afterCanalDataList
     * @param eventType
     * @return
     */
    boolean processData(List<CanalData> beforeCanalDataList, List<CanalData> afterCanalDataList, CanalEntry.EventType eventType);
}
